package com.sdcqjy.property.mode;

import android.text.TextUtils;

/**
 * Created by 磁磁帅 on 2018/4/14.
 * 功能：
 */

public class CommentMode {
    /**
     * id : 2
     * documentID : 24
     * userID : 29
     * userName : 谢磁慈
     * comment : 呵呵呵
     * createTime : 20170414
     * actionTime : 20170414
     */
    //public int id;
    //public int documentID;
    //public int userID;
    public String userName;
    public String comment;
    public String headImageUrl;
    private long createTime;
    //public int actionTime;

    private transient String time;

    public String getTime() {
        if (TextUtils.isEmpty(time)) {
            String s = createTime + "";
            if (s == null || s.length() < 8) s = "00000000";
//            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
//            time = format.format(createTime);
            time = s.substring(0, 4) + "-" + s.substring(4, 6) + "-" + s.substring(6, 8);
        }
        return time;
    }
}
